/**
 *  *2010-3-15 下午06:21:32  add 
 */
package com.base.myproject.client.busi.service.assessment;

import com.base.myproject.client.ui.BaseTabPanel;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author Administrator 2010-3-15 javazgw@gmail.com
 */
public class AssessmentUI extends Composite {

	private static AssessmentUIUiBinder uiBinder = GWT
			.create(AssessmentUIUiBinder.class);

	interface AssessmentUIUiBinder extends UiBinder<Widget, AssessmentUI> {
	}

	// @UiField
	// Button button;
	@UiField
	Anchor assessmentrule1;
	@UiField
	Anchor assessmentrule2;
	@UiField
	Anchor assessment;

	public AssessmentUI() {
		initWidget(uiBinder.createAndBindUi(this));
		HTMLPanel dd = new HTMLPanel("");
		
		
	}

	@UiHandler( { "assessmentrule1", "assessmentrule2", "assessment" })
	public void onClick(ClickEvent event) {
		System.out.println(event.getSource());
		if (event.getSource().equals(assessmentrule1)) {
			Assessment_rule1 tb3 = new Assessment_rule1();
			tb3.complete();
			BaseTabPanel.getInstance().addTab("考核规则1",tb3);
		} else if (event.getSource().equals(assessmentrule2)) {
			Assessment_rule2 tb3 = new Assessment_rule2();
			tb3.complete();
			BaseTabPanel.getInstance().addTab("考核规则2",tb3);
		} else if (event.getSource().equals(assessment)) {
			AssessmentPanel tb3 = new AssessmentPanel();
			//tb3.complete();
			BaseTabPanel.getInstance().addTab("考核",tb3);
		}
	}



}
